package com.acquisition.param.dto;

import java.util.Map;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 串口参数
 * 对应SerialPortParam
 *
 * @author wuqiwei
 * @date 2020/10/15
 */
public class SerialPortConfig {

	@JSONField(name="type")
	private String type;

	@JSONField(name="mn")
	private String mn;

	/**
	 * 这个key是串口名即SingleSerialPortConfig里的portName
	 */
	@JSONField(name="serialPortMap")
	private Map<String, SingleSerialPortConfig> serialPortMap;

	public SerialPortConfig() {
		super();
	}

	public SerialPortConfig(String type, String mn, Map<String, SingleSerialPortConfig> serialPortMap) {
		super();
		this.type = type;
		this.mn = mn;
		this.serialPortMap = serialPortMap;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getMn() {
		return mn;
	}

	public void setMn(String mn) {
		this.mn = mn;
	}

	public Map<String, SingleSerialPortConfig> getSerialPortMap() {
		return serialPortMap;
	}

	public void setSerialPortMap(Map<String, SingleSerialPortConfig> serialPortMap) {
		this.serialPortMap = serialPortMap;
	}

	@Override
	public String toString() {
		return "SerialPortConfig [type=" + type + ", mn=" + mn + ", serialPortMap=" + serialPortMap + "]";
	}

}
